package com.twu.biblioteca.command;

import com.twu.biblioteca.model.Book;
import com.twu.biblioteca.model.Movie;

public class MessageFactory {
    private static String SUCCESSFUL_CHECK_OUT_BOOK = "Thank you! Enjoy the book.";
    private static String FAILED_CHECK_OUT_BOOK = "That book is not available.";
    private static String SUCCESSFUL_CHECK_OUT_MOVIE = "Thank you! Enjoy the movie.";
    private static String FAILED_CHECK_OUT_MOVIE = "That movie is not available.";
    private static String SUCCESSFUL_RETURN_BOOK = "Thank you for returning the book.";
    private static String FAILED_RETURN_BOOK = "That is not a valid book to return.";
    private static String SUCCESSFUL_RETURN_MOVIE = "Thank you for returning the movie.";
    private static String FAILED_RETURN_MOVIE = "That is not a valid movie to return.";

    public static String wrapCheckoutBook(Book book) {
        if(book != null){
            return SUCCESSFUL_CHECK_OUT_BOOK;
        } else{
            return FAILED_CHECK_OUT_BOOK;
        }
    }

    public static String wrapCheckoutMovie(Movie movie) {
        if (movie != null) {
            return SUCCESSFUL_CHECK_OUT_MOVIE;
        }
        return FAILED_CHECK_OUT_MOVIE;
    }

    public static String wrapReturnBook(Book book) {
        if (book != null) {
            return SUCCESSFUL_RETURN_BOOK;
        }
        return FAILED_RETURN_BOOK;
    }

    public static String wrapReturnMovie(Movie movie) {
        if (movie != null) {
            return SUCCESSFUL_RETURN_MOVIE;
        }
        return FAILED_RETURN_MOVIE;
    }

    //public static String
}
